import React from 'react';
import { Menu, Dropdown, Icon } from 'antd';

const DropDown = ({onMenuClick,menuList = []}) =>{
    const menu = (
        <Menu onClick={onMenuClick} >
            {
                menuList.map((item,index)=>{
                    return(
                        <Menu.Item key={index}>
                            <Icon type={item.icon}/>{item.name}
                        </Menu.Item>
                    )
                })
            }
        </Menu>
    )
    return(
        <Dropdown overlay={menu}>
            <a className="ant-dropdown-link" href="#">
                操作<Icon type="down" />
            </a>
        </Dropdown>
    )
}
export default DropDown;